import { instance as request } from "../utils/request";
export const addbtnrole = (data: any) => {
    return request({
      url: `/addbtnrole`,
      method: "post",
      data,
    });
  };
  
  export const getbtnrole = (data: any) => {
    return request({
      url: `/getbtnrole`,
      method: "post",
      data,
    });
  };
  
  export const deletebtnrole = (data: any) => {
    return request({
      url: `/deletebtnrole`,
      method: "post",
      data,
    });
  };
  export const putbtnrole = (data: any) => {
    return request({
      url: `/putbtnrole`,
      method: "post",
      data,
    });
  };
  export const putmenu = (data: any) => {
    return request({
      url: `/putmenu`,
      method: "post",
      data,
    });
  };
  export const getmenud = (data: any) => {
    return request({
      url: `/getmenud`,
      method: "post",
      data,
    });
  };
  
  export const getrolei = (data: any) => {
    return request({
      url: `/getrolei`,
      method: "post",
      data,
    });
  };
  export const addmenu = (data: any) => {
    return request({
      url: "/addmenu",
      method: "post",
      data,
    });
  };
  
  export const getmenu = () => {
    return request({
      url: "/getmenulist",
      method: "get",
    });
  };
  export const delmenu = (id: any) => {
    return request({
      url: '/delmenu',
      method: "post",
      data: { id },
    });
  };